package com.acegear.horizon.domain.models.jpa;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.acegear.horizon.domain.models.constraint.ClubEventType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;


@Entity
@EntityListeners(AuditingEntityListener.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ActivityBase {
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JsonIgnore
	private Long activityId;
	
	@Column
	private Long ownerId;
	
	@Column
	private ClubEventType type;
	
	@Column
	private String name;

	@Column
	private String servicePhone;
	
	@Column
	private String cover;//经纬度
	
	@Column
	private String summary;//介绍
	@Column
	private String memo;
	@Column
	private boolean state;
	@Column
	private boolean deleted;
	
	@CreatedDate
    @Column
    private Long startAt;

    @LastModifiedDate
    @Column
    private Long endAt;
    
    
    public ActivityBase(){
    	
    }
    
    public ActivityBase(Long activityId){
    	this.activityId = activityId;
    }
    
    public ActivityBase(Long activityId,Long ownerId,String name,String servicePhone,String cover,String summary,String memo,boolean state,
    		boolean deleted){
    	this.activityId = activityId;
    	this.ownerId = ownerId;
    	this.name = name;
    	this.servicePhone = servicePhone;
    	this.cover = cover;
    	this.summary = summary;
    	this.memo = memo;
    	this.state = state;
    	this.deleted = deleted;
    }


	public Long getActivityId() {
		return activityId;
	}


	public void setActivityId(Long activityId) {
		this.activityId = activityId;
	}


	public Long getOwnerId() {
		return ownerId;
	}


	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
	}


	public ClubEventType getType() {
		return type;
	}


	public void setType(ClubEventType type) {
		this.type = type;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getServicePhone() {
		return servicePhone;
	}


	public void setServicePhone(String servicePhone) {
		this.servicePhone = servicePhone;
	}


	public String getCover() {
		return cover;
	}


	public void setCover(String cover) {
		this.cover = cover;
	}


	public String getSummary() {
		return summary;
	}


	public void setSummary(String summary) {
		this.summary = summary;
	}


	public String getMemo() {
		return memo;
	}


	public void setMemo(String memo) {
		this.memo = memo;
	}


	public boolean isState() {
		return state;
	}


	public void setState(boolean state) {
		this.state = state;
	}

	public boolean isDeleted() {
		return deleted;
	}


	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}


	public Long getStartAt() {
		return startAt;
	}


	public void setStartAt(Long startAt) {
		this.startAt = startAt;
	}


	public Long getEndAt() {
		return endAt;
	}


	public void setEndAt(Long endAt) {
		this.endAt = endAt;
	}
    
}
